<template>
  <el-dialog title="选择车辆" :visible.sync="dialogBoole" width="1200px">
    <el-form :inline="true" :model="form" class="demo-form-inline">
      <el-form-item label="订单编号:">
        <el-input v-model="form.vinNo" clearable placeholder="请输入车牌号" />
      </el-form-item>
      <el-form-item label="出租方:">
        <el-select v-model="form.workOrderStatus" placeholder="请选择工单状态">

        </el-select>
      </el-form-item>
      <el-form-item label="承租方:">
        <el-select v-model="form.workOrderStatus" placeholder="请选择工单状态">

        </el-select>
      </el-form-item>

      <el-form-item>
        <el-button @click="resetQuery">重置</el-button>
        <el-button type="primary" @click.stop="handleQuery">查询</el-button>
      </el-form-item>

    </el-form>

    <table-page :dataList="tableData" border :total="total" :page.sync="form.pageNum"
                :limit.sync="form.pageSize" @setSizeCurrent="handleList">
      <template slot="tableColAc">
        <el-table-column label="操作" align="center" fixed="left" width="100">
          <template #default="{row}">
            <el-button size="mini" type="text" @click="handleSelect(row)">
              选择车辆
            </el-button>
          </template>
        </el-table-column>
      </template>

      <template slot="tableCol">
        <el-table-column label="订单编号" prop="carNo" show-overflow-tooltip align="center"/>

        <el-table-column label="订单状态" prop="vinNo" show-overflow-tooltip align="center"/>

        <el-table-column label="出租方" prop="customerName" show-overflow-tooltip align="center"/>

        <el-table-column label="承租方" prop="ascription" show-overflow-tooltip align="center"/>

        <el-table-column label="交车总数量" prop="ascription" show-overflow-tooltip align="center"/>

        <el-table-column label="已交车数量" prop="ascription" show-overflow-tooltip align="center"/>

        <el-table-column label="未交车数量"  show-overflow-tooltip align="center"/>

      </template>
    </table-page>
  </el-dialog>
</template>

<script>
export default {
  name: 'addDialog',
  computed: {},
  watch: {},
  data() {
    return {
      form: {
        carNo: '',
        isDisposal: '',
        pageSize: 10,
        pageNum: 1,
      },
      total: 0,
      dialogBoole: false,
      tableData: [{carNo:'豫C213R91'}],
    };
  },
  created() {
  },
  mounted() {
  },
  methods: {
    handleSelect(row) {
      this.dialogBoole = false
      this._toPage({
        path: "/vehicleOrder/orderManagement/DeliveryVehicleEdit",
        name: 'DeliveryVehicleEdit',
      });
    },

    handleOpen() {
      this.dialogBoole = true
      this.handleList()
    },

    resetQuery() {
      this.form = {
        carNo: '',
        isDisposal: '',
        pageSize: 10,
        pageNum: 1,
      }
      this.handleList()
    },

    handleQuery() {
      this.form.pageNum = 1
      this.handleList()
    },

    async handleList() {
      try {
        // const res = await getVinNo(this.form)
        // this.tableData = res.rows
        // this.total = res.total
      } catch (e) {
        console.error(e)
      }

    }
  },
};
</script>

<style scoped lang=""></style>


